<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <!-- 
    v-for遍历数组
      <li v-for="items in list">{{items}}</li>
      <li v-for="(items,index) in list">{{items}}+"==="+{{index}}</li>

    key的作用可以提高性能
      <li v-for="(items,index) in list" :key="items.id">{{items}}</li>
  -->
  <div id="app">
    <li v-for="(items,index) in fruits" :key="items.id">{{items +"======"+index}}</li>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const vm = new Vue({
      el: "#app",
      data: {
        fruits: ["apple", "orange", "banana"]
      },
      methods: {}
    });

  </script>
</body>

</html>
